package com.ywy.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.SystemPropertyUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;


import com.ywy.entity.ClothSize;
import com.ywy.entity.Color;
import com.ywy.entity.ColorAndSize;
import com.ywy.service.ClothSizeService;
import com.ywy.service.ColorAndSizeService;
import com.ywy.service.ColorService;
import com.ywy.util.PageData;

@RestController
public class ColorAndSizeController {

	@Autowired
	private ColorAndSizeService cass;

	@GetMapping(value = "/admin/index/getclothinfo", produces = "application/json;charset=utf-8")
	@ResponseBody
	public PageData<ColorAndSize> getClothInfoByPage(@RequestParam(value = "page", defaultValue = "1") int page,
			@RequestParam(value = "pageSize", defaultValue = "10") int pageSize,
			@RequestParam(value = "key", defaultValue = "") String key) {
		return cass.getClothInfoBykey(page, pageSize, key);

	}
}
